package com.jinzhiyun4j.ssh2.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jinzhiyun4j.ssh2.dao.CompanyDAO;
import com.jinzhiyun4j.ssh2.po.Company;
import com.jinzhiyun4j.ssh2.service.CompanyService;
import com.jinzhiyun4j.ssh2.vo.Page;
import com.jinzhiyun4j.ssh2.vo.PageRequest;

/**   
 * @Package com.jinzhiyun4j.ssh2.service.impl
 * @Class com.jinzhiyun4j.ssh2.service.impl.CompanyServiceImpl 
 * @Description: TODO
 * @author wpf
 * @date 2015骞�鏈�8鏃�涓嬪崍3:11:59 
 * @version V1.0
 * Copyright 瑗垮畨閲戞櫤浜戣捣鐐�Corporation 2015       
 */
@Service
public class CompanyServiceImpl implements CompanyService{

	@Autowired
	private CompanyDAO companyDAO;
	
	/* (non-Javadoc)
	 * @see com.jinzhiyun4j.ssh2.service.CompanyService#findAll()
	 */
	public List<Company> findAll() {
		
		return companyDAO.findAll();
	}
	
	public Page<Company> findPage(int index,int size){
		PageRequest pageRequest=new PageRequest(index,size);
		return companyDAO.findByPageRequest(pageRequest);
	}

}